<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>骨医快线</title>
	<link href="../../css/mui.plus.css" rel="stylesheet" />		
	<style>
		body {
			background-color: #f5f5f5;
		}
		footer {
			position: absolute;
			bottom: 0;
			padding: 20px 30%;
			width: 100%;
		}
		.mui-btn.mui-btn-primary {
			padding: 8px 0;
		}
		.hint {
			padding: 8px 0;
			text-align: center;
			font-size: 15px;
			color: #30B497;
		}
	</style>
</head>
<body>
	
	<header class="mui-bar mui-bar-nav oe-pri-bar">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">量表反馈</h1>
	</header>
	
	<div class="mui-content">
		<textarea id="txt-feedback" name="" rows="8" cols="" placeholder="输入您希望使用的量表名称或者建议"></textarea>
		
	</div>
	<p class="hint">我们将根据您的反馈，不断丰富量表功能</p>
	
	<footer>
		<button id="button-submit" type="button" class="mui-btn mui-btn-primary mui-btn-block">确认提交</button>
	</footer>
	
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/app.js"></script>
	<script src="../../js/lib/template.js"></script>
	<script type="text/javascript">
		(function($, a){
			var txtFb = document.getElementById("txt-feedback");
			
			$('footer').on('tap', '#button-submit', function(){
				if(!a.storage.getUserId()){
					return $.toast('请先登录哟~')
				}
				if(!txtFb.value){
					return $.toast('请输入反馈意见');
				}
				
				app.net.post('c_rating_scale_feedback/create', {fb_dr_id : a.storage.getUserId(), fb_content: txtFb.value}, function(data){
					if(data && data.code === '100'){
						$.alert('您的反馈已提交','骨医快线',function(){
							$.back();
						});
					}
				});
			})
		}(mui, app));
	</script>
</body>
</html>